#pragma once

#include <linux/kconfig.h>

#define __LINUX_SPINLOCK_TYPES_RAW_H

#if defined(CONFIG_SMP)
#include <asm/spinlock_types.h>
#else
#include <linux/spinlock_types_up.h>
#endif

typedef struct raw_spinlock
{
    arch_spinlock_t raw_lock;
} raw_spinlock_t;

#define __RAW_SPIN_LOCK_INITIALIZER(lockname)  \
    {                                          \
        .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
    }

#define __RAW_SPIN_LOCK_UNLOCKED(lockname) \
    (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
